import request from '@/utils/request'

export function add(data) {
  return request({
    url: 'api/dev/data/import/task',
    method: 'post',
    data
  })
}

export function continueRunById(id) {
  return request({
    url: 'api/dev/data/import/task/continue/run/' + id,
    method: 'put'
  })
}

export function suspend(ids) {
  return request({
    url: 'api/dev/data/import/task/suspend',
    method: 'put',
    data: ids
  })
}

export function abolish(ids) {
  return request({
    url: 'api/dev/data/import/task/abolish',
    method: 'put',
    data: ids
  })
}

export function restart(ids) {
  return request({
    url: 'api/dev/data/import/task/restart',
    method: 'put',
    data: ids
  })
}


export default {add, continueRunById, suspend, abolish, restart}
